package com.example.paimengshop.client_socket;

import java.net.Socket;

public class ThreadControl implements Runnable
{
    private Socket socket;
    private SendToServer send;
    private ReceiveFromServer receive;

    public void setSend(SendToServer send)
    {
        this.send = send;
    }

    public SendToServer getSend()
    {
        return send;
    }

    public void setReceive(ReceiveFromServer receive)
    {
        this.receive = receive;
    }

    public ReceiveFromServer getReceive()
    {
        return receive;
    }

    public void setSocket(Socket socket)
    {
        this.socket = socket;
    }

    public Socket getSocket()
    {
        return socket;
    }

    public ThreadControl()
    {

    }

    public ThreadControl(Socket socket)
    {
        this.socket = socket;
    }

    @Override
    public void run()
    {
        receive = new ReceiveFromServer(socket);
        receive.Receive();
    }
}
